<link media="screen" rel="stylesheet" type="text/css"
	href="<?php echo ROOT_URL?>/public/admin.css" />
<center>
<div class="addcate">
	<form action="" method="post">		
			<h1>Assign Website to category</h1>
			 <?php 
			  if($this->errors){
				foreach($this->errors as $item)
				{echo '<span style="color:red;font-weight:bold;">'.$item.'</span><br>';}
			}
			  ?><br>
			<label>Category:</label>
			  <select name="opt_web">
					<option value="0">Chon Website</option>
					<?php foreach ($this->dataweb as $info) {
						?>
						<option value="<?php echo $info['id'];?>"><?php echo $info['name'];?></option>	
					<?php }?>									
				</select>
			<br>
			<label>Website:</label>
				<select name="opt_key">
					<option value="0">Chon Keyword</option>
					<?php foreach ($this->datakey as $item) {
						?>
						<option value="<?php echo $item['id'];?>"><?php echo $item['name'];?></option>	
					<?php }?>
									
				</select>
			<br>
			 <!-- <label>Website:</label><input type="text" name="txtweb" size="25"/><br>
			<label>URL:</label><input type="text" name="txturl" size="25"/><br> -->
			<label>Or keyword:</label><input type="text" name="txtkey" size="25"/><br> 
			<label>&nbsp;</label><input type="submit" name="ok" value="Assign" />		
	</form>	
</div>
<div class="list_keyword_website">
	<table class="table-3">
		<tr>
			<td>Website URL</td>
			<td>Keyword Name</td>
			<td>Action</td>
		</tr>
		<?php foreach ($this->list_web_keyword as $item) {?>
			<tr>
				<td><?php echo $item->website_name;?></td>
				<td><?php echo $item->keyword_name;?></td>
				<td><a href="<?php echo ROOT_URL?>/admintool/deletewebsitekeyword/id/<?php echo $item->id_cate;?>">Del</a></td>
			</tr>
		<?php }?>
	</table>
	
</div>

</center>